import time
from django.shortcuts import render
from views import is_auth

@is_auth
def search(request):
    user = {
        'name': request.user,
        'date': time.time()
    }
    if request.method == 'POST':
        information = {
            'name': request.POST['domain_name']

        }
        return render(request, 'log/search.html', {'user': user, 'information': information})

    return render(request, 'log/search.html', {'user': user})

@is_auth
def analysis(request):
    user = {
        'name': request.user,
        'date': time.time()
    }
    return render(request, 'log/analysis.html', {'user': user})